/**
 * ------------------------------------------------------------*
 *          COPYRIGHT (C) 2006 BOCO Inter-Telecom INC          *
 *   CONFIDENTIAL AND PROPRIETARY. ALL RIGHTS RESERVED.        *
 *                                                             *
 *  This work contains confidential business information       *
 *  and intellectual property of BOCO  Inc, Beijing, CN.       *
 *  All rights reserved.                                       *
 * ------------------------------------------------------------*
 *
 *
 */
/**
 *Revision Information:
 *
 *@version 1.0 2006-2-6 release(zhanglei)
 */

package com.boco.webmaster.base;

import javax.servlet.http.*;

import org.apache.struts.action.*;

import com.boco.transnms.common.dto.base.*;

public class WMBoQueryContext extends WMActionForm implements IBoQueryContext {
    private String dsName = "";
    private int offset = 0;
    private int fetchSize = 20;
    private boolean isCountBeforQuery = false;
    private String actionName = "";
    private String orderField = "";
    private boolean isOrderDesc = false;
    private String userId;
    private int firstCountSize;
    private String clientId;
    private String userName;
    private String hostName;
    private String hostIP;
    private boolean actionChecked;
    private boolean queryDeleted;

    public WMBoQueryContext() {
    }

    public String getClientId() {
        return clientId;
    }

    public void setActionChecked(boolean checked){
        actionChecked = checked;
    }

    public boolean isActionChecked(){
        return actionChecked;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public void setDsName(String dsName) {
        this.dsName = dsName;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public void setFetchSize(int fetchsize) {
        this.fetchSize = fetchsize;
    }

    public void setCountBeforQuery(boolean isCountBeforQuery) {
        this.isCountBeforQuery = isCountBeforQuery;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public void setOrderField(String orderField) {
        this.orderField = orderField;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setFirstCountSize(int firstCountSize) {
        this.firstCountSize = firstCountSize;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDsName() {
        return dsName;
    }

    public int getOffset() {
        return offset;
    }

    public int getFetchSize() {
        return fetchSize;
    }

    public boolean isCountBeforQuery() {
        return isCountBeforQuery;
    }

    public String getActionName() {
        return actionName;
    }

    public String getOrderField() {
        return orderField;
    }

    public String getUserId() {
        return userId;
    }

    public int getFirstCountSize() {
        return firstCountSize;
    }

    public String getUserName() {
        return userName;
    }

    public void formValidate(ActionErrors errors,
                                      ActionMapping mapping,
                                     HttpServletRequest request){
   }

   public void setOrderDesc(boolean isOrderDesc){
       this.isOrderDesc = isOrderDesc;
   }

   public boolean isOrderDesc(){
       return isOrderDesc;
   }

    public String toString(){
        StringBuffer str = new StringBuffer("BoWebQueryContext=[");
        str.append("userId=" + userId);
        str.append(", actionName=" + actionName);
        str.append(", dsName=" + dsName);
        str.append(", offset=" + offset);
        str.append(", fetchSize=" + fetchSize);
        str.append(", orderField=" + orderField);
        str.append(", isOrderDesc=" + isOrderDesc);
        str.append(", isCountBeforQuery=" + isCountBeforQuery);
        str.append(", firstCountSize=" + firstCountSize);
        str.append("]");
        return str.toString();
    }

    public String getHostIP() {
        return this.hostIP;
    }

    public String getHostName() {
        return this.hostName;
    }

    public void setHostIP(String hostIP) {
        this.hostIP = hostIP;
    }

    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    public void setQueryDeleted(boolean queryDeleted) {
        this.queryDeleted = queryDeleted;
    }

    public boolean isQueryDeleted() {
        return this.queryDeleted;
    }

}
